package com.dayuanit.dy15.ebook.bookshop.enums;

public enum OrderStatusEnum {
//1-待支付 2-待发货 3-已发货 4-已完成 5-已取消
    待支付(1, "待支付"),
    待发货(2, "待发货"),
    已发货(3, "已发货"),
    已完成(4, "已完成"),
    已取消(5, "已取消");

    private int k;
    private String v;

    private OrderStatusEnum(int k, String v) {
        this.k = k;
        this.v = v;
    }

    public static OrderStatusEnum get(int k) {
        for (OrderStatusEnum e : OrderStatusEnum.values()) {
            if (e.getK() == k) {
                return e;
            }
        }
        return null;
    }

    public String getV() {
        return v;
    }

    public int getK() {
        return k;
    }
}
